package com.dorm.pojo;

public class Dorm {
	private Integer id;
	private String dname;
	private String building_no;
	private String type;
	private Integer stu_number;
	private Integer max_stu_number;
	@Override
	public String toString() {
		return "Student [id=" + id + ", dname=" + dname + ", building_no=" + building_no + ", type=" + type
				+ ", stu_number=" + stu_number + ", max_stu_number=" + max_stu_number + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((building_no == null) ? 0 : building_no.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((max_stu_number == null) ? 0 : max_stu_number.hashCode());
		result = prime * result + ((dname == null) ? 0 : dname.hashCode());
		result = prime * result + ((stu_number == null) ? 0 : stu_number.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Dorm other = (Dorm) obj;
		if (building_no == null) {
			if (other.building_no != null)
				return false;
		} else if (!building_no.equals(other.building_no))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (max_stu_number == null) {
			if (other.max_stu_number != null)
				return false;
		} else if (!max_stu_number.equals(other.max_stu_number))
			return false;
		if (dname == null) {
			if (other.dname != null)
				return false;
		} else if (!dname.equals(other.dname))
			return false;
		if (stu_number == null) {
			if (other.stu_number != null)
				return false;
		} else if (!stu_number.equals(other.stu_number))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getDname() {
		return dname;
	}
	public void setDname(String name) {
		this.dname = name;
	}
	public String getBuilding_no() {
		return building_no;
	}
	public void setBuilding_no(String building_no) {
		this.building_no = building_no;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Integer getStu_number() {
		return stu_number;
	}
	public void setStu_number(Integer stu_number) {
		this.stu_number = stu_number;
	}
	public Integer getMax_stu_number() {
		return max_stu_number;
	}
	public void setMax_stu_number(Integer max_stu_number) {
		this.max_stu_number = max_stu_number;
	}
	

}
